﻿@model WmWebSystem.Models.RegisterModel
@{
    ViewBag.Title = "注册独音账户咯";
}
<section id="content">
<div class="href_path_link"><h6>YOU ARE HERE: <a href="@Url.Action("Index", "Home")">首页</a>>注册</h6></div>


<!-- 2/3 columns -->
<h3 class="padd-top">注册独音账号</h3>
<div class="con_border"></div>
<div class="column column-2-3">
	<h3 class="no-marg-top">Read Me</h3> 
    <textarea class="text_area" name="message" disabled="disabled"  rows="18" cols="80">
       @(new MvcHtmlString(ViewBag.Clause))
    </textarea>
</div>
 <div class="column column-1-3 column-last">
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

    @using (Html.BeginForm())
    {
        @Html.ValidationSummary(true, "注册账户失败. 请核对信息后重试.")
        <table>
            <tr>
               <th colspan="2">
                   <br />
                   <h3 class="no-marg-top">注册</h3>
               </th>
            </tr>
            <tr>
               <th colspan="2"><hr /></th>
            </tr>
            <tr>
                <th align="right">用户名：</th>
                <td>
                    @Html.TextBoxFor(m => m.UserName)
                    @Html.ValidationMessageFor(m => m.UserName)
                </td>
            </tr>
            <tr>
                <th align="right">邮  箱：</th>
                <td>
                    @Html.TextBoxFor(m => m.Email)
                    @Html.ValidationMessageFor(m => m.Email)
                </td>
            </tr>
            <tr>
                <th align="right">密  码：</th>
                <td>
                    @Html.PasswordFor(m => m.Password)
                    @Html.ValidationMessageFor(m => m.Password)
                </td>
            </tr>
            <tr>
                <th align="right">确认密码：</th>
                <td>
                    @Html.PasswordFor(m => m.ConfirmPassword)
                    @Html.ValidationMessageFor(m => m.ConfirmPassword)
                </td>
            </tr>
            <tr>
                <th align="right">同意条款：</th>
                <td>
                    <input type="checkbox" id="IsCheck" />
                </td>
            </tr>
            <tr>
                <th></th>
                <td>
                    <input type="submit" class="button medium black" value="注册 >>" />
                    <input type="reset" class="button medium black" value="Reset >>" />
                </td>
            </tr>
            <tr>
               <th colspan="2"><br />
                   <p>【注】密码的字符长度不得小于 @Membership.MinRequiredPasswordLength 个字符数.</p>
               </th>
            </tr>
        </table>
        
    }
</div>
<div class="clear"></div>
<!-- END 1/3 columns -->
</section>


<script type="text/javascript">
$(function () {
    //确认提交
    $("input[type='submit']").click(function () {
        if (confirm("确认提交？")) {
            if($("input[type='checkbox'][id='IsCheck']:checked").attr("checked"))
            {
                 return true;
            }
            else
            {
                alert("您还未同意条款！");
                return false;
            }
        }
        else {
            return false;
        }
    });
});
</script>